{extend name="common/base" /}

{block name="body"}
<div class="qbsr-mains">
    <div  class="qbsr-top">
        {notpresent name="wallet"}
        <div class="top-mains">
            <div class="top-ma-zu">
                <div class="ma-zu-ps">可提现金额（元）</div>
                <div class="ma-zu-ps2">0.00</div>
            </div>
            <a href="{:url('My/cash')}">
                <div class="top-ma-you">
                    <div class="ma-zu-xt">提现</div>
                </div>
            </a>
        </div>
        <div class="top-mains2">
            <div class="ins2-left">
                <div class="insz-le-ps1">冻结金额（元）</div>
                <div class="insz-le-ps2">0.00</div>
            </div>
            <div class="ins2-right">任务完成后，并通过平台审核，冻结资金将解冻进入可提现金额</div>
        </div>
        {else /}
        <div class="top-mains">
            <div class="top-ma-zu">
                <div class="ma-zu-ps">可提现金额（元）</div>
                <div class="ma-zu-ps2">{$wallet.cash_amount}</div>
            </div>
            <a href="{:url('My/cash')}">
                <div class="top-ma-you">
                    <div class="ma-zu-xt">提现</div>
                </div> 
            </a>
        </div>
        <div class="top-mains2">
            <div class="ins2-left">
                <div class="insz-le-ps1">冻结金额（元）</div>
                <div class="insz-le-ps2">{$wallet.frozen_amount}</div>
            </div>
            <div class="ins2-right">任务完成后，并通过平台审核，冻结资金将解冻进入可提现金额</div>
        </div>
        {/notpresent}
        <div class="top-nav">
            <div class="t-n-div acti"><span>收入</span></div>
            <div class="t-n-div"><span>支出</span></div>
        </div>
    </div>
    <!-- 收入 -->
    <ul class="qbsr-nav">
        {notempty name="shou"}
        {volist name="shou" id="vo"}
        <li>
            <div class="nav-zuo">
                {switch name="$vo.change_matters"}
                {case value="1"}
                <div class="z-s-ps">任务收入（任务单号：{$vo.order_no}）</div>
                {/case}
                {case value="2"}
                <div class="z-s-ps">佣金收入（任务单号：{$vo.order_no}）</div>
                {/case}
                {case value="3"}
                <div class="z-s-ps">平台调整</div>
                {/case}
                {/switch}
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-yuo">+{$vo.change_amount}</div>
        </li>

        {/volist}
        {else/}
        <li>
            <div class="nav-zuo">
                <div class="z-s-ps">没有记录</div>
            </div>
        </li> 
        {/notempty}

    </ul>
    <!-- 支出 -->
    <ul class="qbsr-nav" style="display: none;">

        {notempty name="zhi"}
        {volist name="zhi" id="vo"}
        {switch name="$vo.change_matters"}
        {case value="5"}
        <li>
            <div class="nav-zuo">

                <div class="z-s-ps">佣金支出（任务单号：{$vo.order_no}）</div>
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-yuo">-{$vo.change_amount}</div>
        </li>
        {/case}
        {case value="3"}
        <li>
            <div class="nav-zuo">
                <div class="z-s-ps">平台调整</div>
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-yuo">-{$vo.change_amount}</div>
        </li>
        {/case}

        {case value="4"}
        {switch name="$vo.cash_info.status"}
        {case value="0"}
        <li>
            <div class="nav-zuo">
                <div class="z-s-ps">提现</div>
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-rig">
                <div class="div1">-{$vo.change_amount}</div>
                <div class="div1">待审核</div>
            </div>
        </li> 
        {/case}
        {case value="1"}
        <li>
            <div class="nav-zuo">
                <div class="z-s-ps">提现</div>
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-rig">
                <div class="div1">-{$vo.change_amount}</div>
                <div class="div1">待审核</div>
            </div>
        </li> 
        {/case}
        {case value="10"}
        <li class="js-tixianshibai">
            <input type="hidden" class="refusal_reason" value="{$vo.cash_info.refusal_reason}" />
            <div class="nav-zuo">
                <div class="z-s-ps">提现</div>
                <div class="z-s-ps2">{$vo.createtime|date="Y-m-d h:i:s",###}</div>
            </div>
            <div class="nav-rig">
                <div class="div1">-{$vo.change_amount}</div>
                <div class="div1 div2"><span>?</span>提现失败</div>
            </div>
        </li> 
        {/case}
        {/switch}
        {/case}
        {/switch}

        {/volist}
        {else/}
        <li>
            <div class="nav-zuo">
                <div class="z-s-ps">没有记录</div>
            </div>
        </li> 
        {/notempty}
        <!--        <li>
                    <div class="nav-zuo">
                        <div class="z-s-ps">没有记录</div>
                        <div class="z-s-ps2">2018-09-09 12:22:22</div>
                    </div>
                    <div class="nav-rig">
                        <div class="div1">-9000.00</div>
                        <div class="div1">审核中</div>
                    </div>
                </li> -->

    </ul>        
</div>

<!-- 弹框 -->
<div class="qbsr-feixde" style="display: none;"></div>
<div class="qbsr-fe-zu" style="display: none;">
    <p class="p1">失败原因</p>
    <p class="p2">就是失败了，失败了</p>
    <div class="p3">我知道了</div>
</div>
{/block}
{block name="menu"}
{/block}
{block name="script"}
<script type="text/javascript">
    $(".top-nav div").bind('click', function () {
        $(this).addClass("acti").siblings().removeClass("acti");
        $('.qbsr-nav').eq($(this).index()).show().siblings(".qbsr-nav").hide();
    });

    $(".js-tixianshibai").bind('click', function () {
        var yuanyin = $(this).children(".refusal_reason").val();
        mui.alert(yuanyin, '失败原因');
    });
</script>
{/block}
